import { Inject, Get, Query } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { ContentArticleService } from '../../service/article';
import { ContentArticleEntity } from '../../entity/article';

@CoolController({
    api: ['page', 'info', 'list'],
    entity: ContentArticleEntity,
    service: ContentArticleService,
})
export class ProviderContentArticleController extends BaseController {
    @Inject()
    contentArticleService: ContentArticleService;

    // @Get('/page', { summary: '获取文章列表' })
    // async page(@Query() query: any) {
    //     return this.ok(await this.contentArticleService.pageOpen(query));
    // }

    // @Get('/info', { summary: '获取文章详情' })
    // async info(@Query('id') id: number) {
    //     return this.ok(await this.contentArticleService.infoOpen(id));
    // }
}

